<?php

namespace app\controller;

use app\BaseController;
use app\model\Category;
use app\model\OrdersItem;
use app\utils\simple_html_dom;
use think\App;
use think\Db;
use think\db\Where;
use think\facade\Cache;
use think\facade\View;

//require 'vendor/autoload.php';
use Firebase\JWT\JWT;


class UploadController extends BaseController
{

    var $courseModel;
    var $categoryModel;
    var $menuModel;
    var $redis;

    public function __construct(App $app)
    {
        parent::__construct($app);
        $this->courseModel = new \app\model\Course();
        $this->categoryModel = new \app\model\Category();
        $this->menuModel = new \app\model\Menu();
        $this->redis = Cache::store('redis');
    }


    //查询课程订单信息
    public function html(){
        //$path = $this->request->param('path');
        /*$sql = "select * from order_item a left join orders b on a.order_id=b.id where b.user_id=:uid and a.course_id=:cid and b.state=1";
        $items = \think\facade\Db::query($sql,['uid' => $user_id,'cid' => $course_id]);
        if (count($items)>0){
            return $items[0];
        }*/
        return null;
    }


}